<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018-4-23
  Time: 19:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%-- JSP 脚本 --%>
<p> 5 * 2 = <% out.write(5 * 2);%></p>

<%-- JSP 表达式 --%>
<p>5 + 2 = <%= 5 + 2%>
</p>

<%-- EL 表达式 --%>
<p> 5 - 2 = ${ 5 - 2 }</p>

<%

    int a = 10;

    double b = 1.0;

    String name = "gschen";

    pageContext.setAttribute("name", "chen1");

//    out.write((String) pageContext.getAttribute("name"));
//
//    request.setAttribute("name", "chen2");
//
//    session.setAttribute("name", "chen3");
//
//    application.setAttribute("name", "chen4");
%>

<h1>${name}</h1>



</body>
</html>
